<?php

use Zizaco\Entrust\EntrustRole;

class Role extends EntrustRole {

    /**
     * Ardent validation rules
     *
     * @var array
     */
    public static $rules = array (
        'name' => 'required|between:1,128'
    );

    public function users() {
        return $this->belongsToMany('User', 'assigned_roles', 'role_id', 'user_id')->withTimestamps()->withPivot('id', 'updater');
    }

}
